package Utils;

import service.UserService;

import java.lang.reflect.Proxy;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2024/12/05
 * @description 动态代理，代理对象的封装
 */
public class ProxyUtil {
    public static Object createProxy(Object target) {
        return Proxy.newProxyInstance(target.getClass().getClassLoader(),
                target.getClass().getInterfaces(),
                new MyInvocationHandler(target));
    }
}
